using System;
using System.Data;
using System.Collections;

namespace Company.Product.Entity
{
	/// <summary>
	/// Summary description for KeHoachChiTieu.
	/// </summary>
	public class KeHoachChiTieu
	{

      private Int32 _IDChiTieu;
      private Int32 _LoaiChiTieu;
      private DateTime _ThoiGianThem;
      private DateTime _ThoiGianCapNhat;
      private Int32 _SoTien;
      private string _GhiChu;

      #region Properties

      public bool IsIDChiTieuNullable
      { get { return false;  } }
      public Int32 IDChiTieu
      {
         get { return _IDChiTieu; }
         set { _IDChiTieu = value; }
      }
      public bool IsLoaiChiTieuNullable
      { get { return true;  } }
      public Int32 LoaiChiTieu
      {
         get { return _LoaiChiTieu;  }
         set { _LoaiChiTieu = value; }
      }
      public bool IsThoiGianThemNullable
      { get { return true;  } }
      public DateTime ThoiGianThem
      {
         get { return _ThoiGianThem;  }
         set { _ThoiGianThem = value; }
      }
      public bool IsThoiGianCapNhatNullable
      { get { return false;  } }
      public DateTime ThoiGianCapNhat
      {
         get { return _ThoiGianCapNhat;  }
         set { _ThoiGianCapNhat = value; }
      }
      public bool IsSoTienNullable
      { get { return false;  } }
      public Int32 SoTien
      {
         get { return _SoTien;  }
         set { _SoTien = value; }
      }
      public bool IsGhiChuNullable
      { get { return true;  } }
      public string GhiChu
      {
         get { return _GhiChu;  }
         set { _GhiChu = value; }
      }

      #endregion

      #region Constructors
      public KeHoachChiTieu()
      {
         Reset();
      }
      public KeHoachChiTieu(KeHoachChiTieu obj)
      {
	this._IDChiTieu = obj.IDChiTieu;
	this._LoaiChiTieu = obj.LoaiChiTieu;
	this._ThoiGianThem = obj.ThoiGianThem;
	this._ThoiGianCapNhat = obj.ThoiGianCapNhat;
	this._SoTien = obj.SoTien;
	this._GhiChu = obj.GhiChu;
      }
      #endregion

      public void Reset()
      {
         _IDChiTieu = EmptyValues.v_Int32;
         _LoaiChiTieu = EmptyValues.v_Int32;
         _ThoiGianThem = EmptyValues.v_DateTime;
         _ThoiGianCapNhat = EmptyValues.v_DateTime;
         _SoTien = EmptyValues.v_Int32;
         _GhiChu = EmptyValues.v_string;
      }


        #region Hidden

/*
      //private void readProperties(IDataReader reader)
      //{
      //   try
      //   {
                if(!(reader["IDChiTieu"] is DBNull))
		{
			obj.IDChiTieu = (Int32)reader["IDChiTieu"];
		}
                if(!(reader["LoaiChiTieu"] is DBNull))
		{
			obj.LoaiChiTieu = (Int32)reader["LoaiChiTieu"];
		}
                if(!(reader["ThoiGianThem"] is DBNull))
		{
			obj.ThoiGianThem = (DateTime)reader["ThoiGianThem"];
		}
                if(!(reader["ThoiGianCapNhat"] is DBNull))
		{
			obj.ThoiGianCapNhat = (DateTime)reader["ThoiGianCapNhat"];
		}
                if(!(reader["SoTien"] is DBNull))
		{
			obj.SoTien = (Int32)reader["SoTien"];
		}
                if(!(reader["GhiChu"] is DBNull))
		{
			obj.GhiChu = (string)reader["GhiChu"];
		}
//            _IDChiTieu = (reader["IDChiTieu"] is DBNull)?DalTools.EmptyValues.v_Int32:(Int32)reader["IDChiTieu"];
//            _LoaiChiTieu = (reader["LoaiChiTieu"] is DBNull)?DalTools.EmptyValues.v_Int32:(Int32)reader["LoaiChiTieu"];
//            _ThoiGianThem = (reader["ThoiGianThem"] is DBNull)?DalTools.EmptyValues.v_DateTime:(DateTime)reader["ThoiGianThem"];
//            _ThoiGianCapNhat = (reader["ThoiGianCapNhat"] is DBNull)?DalTools.EmptyValues.v_DateTime:(DateTime)reader["ThoiGianCapNhat"];
//            _SoTien = (reader["SoTien"] is DBNull)?DalTools.EmptyValues.v_Int32:(Int32)reader["SoTien"];
//            _GhiChu = (reader["GhiChu"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["GhiChu"];
      //   }
      //   catch (Exception ex)
      //   {
      //      //throw new DalException("Failed to read properties from DataReader.", ex);
      //      //throw new DalException("Failed to read properties from DataReader.\r\n" + ex.Message);
      //	throw ex;
      //   }
      //}
      
*/

        #endregion


      public void Fill(Int32 IDChiTieu, Int32 LoaiChiTieu, DateTime ThoiGianThem, DateTime ThoiGianCapNhat, Int32 SoTien, string GhiChu)
      {
         this._IDChiTieu = IDChiTieu;
         this._LoaiChiTieu = LoaiChiTieu;
         this._ThoiGianThem = ThoiGianThem;
         this._ThoiGianCapNhat = ThoiGianCapNhat;
         this._SoTien = SoTien;
         this._GhiChu = GhiChu;
      }
   }
}